UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Jo8GiIRYxANVaYMk/G6sPZyzOB3JtPr7Sd+esYeU2bI='
WHERE
key_id = '846f6f92a7621efbaa276d8cc15f0c80c65627eafbb19124e24dd6ad8f84f485'
AND (
token = 'Jo8GiIRYxANVaYMk/G6sPZyzOB3JtPr7Sd+esYeU2bI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)