UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xjbGIWhrhosxWcimYYk56Gmhanh1ppjcqgKcea3rdD0='
WHERE
key_id = '96905840c1345636ed08be9f9721918dc6a2133d11e8836ab86aa8924613962c'
AND (
token = 'xjbGIWhrhosxWcimYYk56Gmhanh1ppjcqgKcea3rdD0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)