UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 't6xgwRZInZ8MspT8IJFNBSPCSmZyHCox0F93VgKu6ag=' 
WHERE 
  key_id = '42426e5579889a4ffd6bbe665ca71e67e96e8c9ca132b47571f2c168d78ebaca' 
  AND (
    token = 't6xgwRZInZ8MspT8IJFNBSPCSmZyHCox0F93VgKu6ag=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019