UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/ktsykNSVIy9YshfMTnrdHF2BxlbBXgCnYvfnrGJUMI=' 
WHERE 
  key_id = '98d53b97ff123ef127622e1d98ba84ba0e3c5f4eb0f7067fe8d4d988323942b7' 
  AND (
    token = '/ktsykNSVIy9YshfMTnrdHF2BxlbBXgCnYvfnrGJUMI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042