UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SK3f6tiIDf2SbY1Vuy7hYZwuFEmvx4P1JXD2YVz2iaY=' 
WHERE 
  key_id = '47d7f6751b956c92b630243e6b8ad0a38e2b219bdef8ee1ee05f4fd2fb9ed101' 
  AND (
    token = 'SK3f6tiIDf2SbY1Vuy7hYZwuFEmvx4P1JXD2YVz2iaY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035