UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FfNhLoQDo5emreL0Ky3PBTHr8NruMFURf1uvsdVdSS8='
WHERE
key_id = '03f362783640799288bee3e234ccd306379d60423c619cb3f039893f77924489'
AND (
token = 'FfNhLoQDo5emreL0Ky3PBTHr8NruMFURf1uvsdVdSS8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)