UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jSZWAVEZdRru15NQ4gGj/CbFy/CoLT5aZ3kM2DJyY3o='
WHERE
key_id = '235b0d29dd53408551a7ad7883b014f061ac979461029f363127979207abe5bc'
AND (
token = 'jSZWAVEZdRru15NQ4gGj/CbFy/CoLT5aZ3kM2DJyY3o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)