UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vcqtKlY96Ct0KkzSqWPjxDsZ1BQKSYqU4WN8+R9nVIw='
WHERE
key_id = '194efe5365c3a3cce04565e9b76a5671cd0c2c3201ee24cf99ec5a37672eb9c1'
AND (
token = 'vcqtKlY96Ct0KkzSqWPjxDsZ1BQKSYqU4WN8+R9nVIw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)