UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Cx7bOzz2J846+tic/8CvUV3lswBnsKpZ0s2BzbA4VIg=' 
WHERE 
  key_id = 'b3857b3de2d4dc26047087acb5c5b9a007d5eb714a1bc620fd6b4c6c53b21f6f' 
  AND (
    token = 'Cx7bOzz2J846+tic/8CvUV3lswBnsKpZ0s2BzbA4VIg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030