UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bti4dNjaT2MR2Jx5MC/uE0CtsaaYvQeR2JmN1uX/vpE='
WHERE
key_id = '0caf21f1cfa61c8c121c3cff2222eb4157542ebe09c2fc39f86e2f45e5b60089'
AND (
token = 'bti4dNjaT2MR2Jx5MC/uE0CtsaaYvQeR2JmN1uX/vpE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)