UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MRszqZrcFSJHwynrMBqYtSTVYfXdex4z6A99gsXNTuE='
WHERE
key_id = '32870d4e77139f057f52c8fda8cb15608e8ea0d26dadbe1395772ecaf205b245'
AND (
token = 'MRszqZrcFSJHwynrMBqYtSTVYfXdex4z6A99gsXNTuE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)