UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IqpykkRsMaCQpXy+oS9N9oU/233PTmGtOOWzCDWRoys='
WHERE
key_id = '730023ecca96c9e7d7a7b6a3b37bb895fa441f5ee7a51a5946975a42bd3b6d34'
AND (
token = 'IqpykkRsMaCQpXy+oS9N9oU/233PTmGtOOWzCDWRoys='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)