UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QOZykwoPLTUR/P759ajl3ZZKlSshekKgepHDUGOET5A='
WHERE
key_id = '4a71e396f7511d4101ef9a46f8a7b80e8d76144998c493ccf7ed7362e3069847'
AND (
token = 'QOZykwoPLTUR/P759ajl3ZZKlSshekKgepHDUGOET5A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)