UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1kUZl6mu/82VZKFhllu6iW/Cmr1ddHqfDi6RKidot4A='
WHERE
key_id = 'cee57347995afc8e5edad33dc6da33b42f7a48972425b474fce526910d07fe71'
AND (
token = '1kUZl6mu/82VZKFhllu6iW/Cmr1ddHqfDi6RKidot4A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)