UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pkfiKfSNCRXVw3/Ckm9u7BeWNEwD/itnshQfhmFDMck='
WHERE
key_id = '5ce4b5d280f33b2c7b7ce2da88b043bbc334e0848f31350c9cae3fdf74411f63'
AND (
token = 'pkfiKfSNCRXVw3/Ckm9u7BeWNEwD/itnshQfhmFDMck='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)