UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6qHNpnsGh+NO+U4jFBXR/VH4aXvgcObhLr9WgCV2Cpc=' 
WHERE 
  key_id = '44c342b2ff2b10a4f83df4d23ffb43df393e0100c28f84a5c4b76b366682f523' 
  AND (
    token = '6qHNpnsGh+NO+U4jFBXR/VH4aXvgcObhLr9WgCV2Cpc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015