UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ysQUkmNBD9btzjLCl/fzuFYtwK4aeRYCJ0fpucpBs+Q='
WHERE
key_id = 'e861f205e0aac99f965dbbfc9f3414e6754bc20c3b259a72cc36687b1f8926c1'
AND (
token = 'ysQUkmNBD9btzjLCl/fzuFYtwK4aeRYCJ0fpucpBs+Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)