UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RyYsZkN6FoUR4ZjrbdqZQrondyKClinCngM3t/1pqQg='
WHERE
key_id = '21b095cba20de203f8051d769fd8922951005ebaf32b88e9c8cc59f8fb4a442e'
AND (
token = 'RyYsZkN6FoUR4ZjrbdqZQrondyKClinCngM3t/1pqQg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)