UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'h/jzW+F3MmIfz2oBktQIoG/hsNnu3Z9FZGi/IukzKzU='
WHERE
key_id = '7141b2bd887d7314bb2dbab354f89e35f0cb76b3aa94b38933f189d86d2948ff'
AND (
token = 'h/jzW+F3MmIfz2oBktQIoG/hsNnu3Z9FZGi/IukzKzU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)