UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'G9cOmSBmjcPyHbI/RvOE6UWMIge3L/EHSs3ZOpnXBLk='
WHERE
key_id = '03e18063de03b59fb73a01128d4f8b61a9ff25c02e9b867fb74703c58372af92'
AND (
token = 'G9cOmSBmjcPyHbI/RvOE6UWMIge3L/EHSs3ZOpnXBLk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)