UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QHeoygBjDRl45zV3w98KKRwB5Lnz9CkN1p2HfQr8BFA='
WHERE
key_id = '44ddd19bb9224c2bcf2dba649122d5a98900dc1a93602492a2ee897c2f4c74af'
AND (
token = 'QHeoygBjDRl45zV3w98KKRwB5Lnz9CkN1p2HfQr8BFA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)