UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gfRs7gcWLys/rmLzrAbU4BrJ05iYf6xsN+5XuPLTsPM='
WHERE
key_id = '591f1fb2f5216664ab10f17b6278d817cb0bedbd62d2f1b60ec2b9c844e7104d'
AND (
token = 'gfRs7gcWLys/rmLzrAbU4BrJ05iYf6xsN+5XuPLTsPM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)