UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1omqzwLNL4lXqoZJoBLBIK8/iUv5YiSHpDFZjKVS5AA=' 
WHERE 
  key_id = '268df82d9ef6a719e5f8fc2423248056d0b777cf20d5a5ec78d21b84080356b4' 
  AND (
    token = '1omqzwLNL4lXqoZJoBLBIK8/iUv5YiSHpDFZjKVS5AA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023