UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Rp5h1sSQSgHWF0gG5jNeTPRQjg4l7QLuCNUgN6JxAsw='
WHERE
key_id = '3accb5447f444ae44ab4692da2caa7bc7551ddbd5e8de30ae6e4fc1e63dd7655'
AND (
token = 'Rp5h1sSQSgHWF0gG5jNeTPRQjg4l7QLuCNUgN6JxAsw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)