UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VWuIoo912csA7rDLwAoN1taTW+nReFOvkLTCCKFoMMM='
WHERE
key_id = '2b3dba2d8476917d34cffb4c72d6a1c2f6af3c2b14d67090b4fd6bd49a0396bc'
AND (
token = 'VWuIoo912csA7rDLwAoN1taTW+nReFOvkLTCCKFoMMM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)