UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Y5EzF6M+LLlJorGAVaAF5PGOFgePHNw4TIQfmtRjpMI='
WHERE
key_id = '36d98e17f72a80e6e76f497dc29602a309a5c28573ae85b11eb3b22a98706e36'
AND (
token = 'Y5EzF6M+LLlJorGAVaAF5PGOFgePHNw4TIQfmtRjpMI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)