UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NjA49q2xHku/lj1Zjd4sUl0Jup+ItfjhhXksrTGHA0c='
WHERE
key_id = '014c9176d2eef5fb573e0a7e83dc75d113b92baa09a77c56ac513d7920862e9e'
AND (
token = 'NjA49q2xHku/lj1Zjd4sUl0Jup+ItfjhhXksrTGHA0c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)