UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/xmwL/iPRWAubfOaCW4SXW7FkR3FcHY/dFGk58Ko2/o='
WHERE
key_id = '53f7109b5b090090050b1ee004328c3e40e4a46dee9b1eb9c5b46e33d74800c4'
AND (
token = '/xmwL/iPRWAubfOaCW4SXW7FkR3FcHY/dFGk58Ko2/o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)