UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TX65UmhkgR+JxLuJ0/ptS7QWUrFg9HdWqTXszJ2cUOE='
WHERE
key_id = '33c63bce8d23a858d1575d76af3d496dfa322931abbc202a373892e143e0ef81'
AND (
token = 'TX65UmhkgR+JxLuJ0/ptS7QWUrFg9HdWqTXszJ2cUOE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)