UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oNbJmll/xdngzvDv7qbM2hQb3l16wRAtG9DdTTv0m60='
WHERE
key_id = '154ab0aefede105dfde42312df380cb9b28c5c06bf1d8825edcadf5d8be51c54'
AND (
token = 'oNbJmll/xdngzvDv7qbM2hQb3l16wRAtG9DdTTv0m60='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)